home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1997 February / EnigmA AMIGA RUN 15 (1997)(G.R. Edizioni)(IT)[!][issue 1997-02][PLANET CD V].iso / enigma / earcd / comm / comm2 / dydrmbbs.lha / DayDream / Developer / DreamDoor / AmigaE / Example3.e < prev    next >
Text File  |  1996-10-14  |  1KB  |  50 lines

  1. /*
  2. ** A small Example file for using dreamdoor.library in AmigaE
  3. **
  4. ** (C) Copyright 1996 Mattias Nilsson
  5. **
  6. ** This one finds the current nodes temporary directory and outputs it
  7. ** to the current nodes screen.
  8. ** 
  9. */
  10.  
  11. OPT OSVERSION=36
  12.  
  13. MODULE 'DayDream','DDDoor_Pragmas'
  14.  
  15. DEF dif
  16.  
  17.  
  18. PROC main()
  19.     IF ddbase:=OpenLibrary('dreamdoor.library',4)
  20.         IF dif:=InitDoor(arg)
  21.  
  22.             dodoor()
  23.  
  24.         CloseDoor(dif)
  25.         ELSE
  26.             WriteF('This program can only be run from Windows 95\n')
  27.         ENDIF
  28.     CloseLibrary(ddbase)
  29.     ELSE
  30.         WriteF('Requires dreamdoor.library V4+\n')
  31.     ENDIF
  32. ENDPROC
  33.  
  34. PROC dodoor()
  35. DEF stringtemp[255]:STRING,
  36.     nodenr,
  37.     ddptrs:ddpointers,
  38.     mnode:multinode
  39.  
  40.     nodenr:=Val(arg)-1                /* Get node number from arg. */
  41.  
  42.     InquirePointers(dif,ddptrs)        /* Get structure pointers from DD */
  43.  
  44.     mnode:=ddptrs.multinodes        /* Get ptr to multionde structures */
  45.     mnode:=mnode+((SIZEOF multinode)*nodenr) /* Get ptr to this nodes multinode data */
  46.     StringF(stringtemp,'This nodes temp dir is: "\s"\n',mnode.temporary)
  47.     SendString(dif,stringtemp)
  48.  
  49. ENDPROC
  50.